package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
)

func main() {
	// 创建一个从os.Stdin读取数据的Scanner，默认的分隔函数是ScanLines
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	for scanner.Scan() {
		fmt.Println(scanner.Text())
		if scanner.Text() == "quit" {
			break
		}
	}

	if err := scanner.Err(); err != nil{
		log.Fatal(err)
	}
}
